package com.common.exception;

import com.common.Enums.BaseEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * @ClassName CourseException
 * @Description TODO
 * @Author 无名小卒
 * @Date 2023/7/12 19:46
 * @Version 1.0
 */
@Setter
@Getter
public class CourseException extends RuntimeException {

    private Integer code;

    public CourseException(BaseEnum resultEnum) {
        super(resultEnum.getDesc());
        this.code = resultEnum.getStatus();
    }

    public CourseException(Integer code, String message) {
        super(message);
        this.code = code;
    }

}
